# Contributor: lauren n. liberda <lauren@selfisekai.rocks>
# Maintainer: lauren n. liberda <lauren@selfisekai.rocks>
pkgname=pest-language-server
pkgver=0.3.9
pkgrel=0
pkgdesc="Language Server for Pest"
url="https://github.com/pest-parser/pest-ide-tools"
arch="all"
license="Apache-2.0"
makedepends="cargo cargo-auditable openssl-dev"
source="
	https://github.com/pest-parser/pest-ide-tools/archive/refs/tags/v$pkgver/pest-ls-$pkgver.tar.gz
	use-openssl.patch
	"
builddir="$srcdir/pest-ide-tools-$pkgver"

prepare() {
	default_prepare

	cargo fetch --locked --target="$CBUILD"
}

build() {
	cargo auditable build -p pest-language-server --frozen --release
}

check() {
	cargo test -p pest-language-server --frozen
}

package() {
	install -Dm755 target/release/pest-language-server "$pkgdir"/usr/bin/pest-language-server
}

sha512sums="
cb9eaaf7798395680af2c00415f4a8cd2a3b875c44c3304b1a605308dccf9756adc991285c26f67c73ad0f4775d1ef724e5349eecce1bd4f461c9171674d2b9d  pest-ls-0.3.9.tar.gz
37b106a44b32ba80e867d51f33499d148c3ffceb17c57482006e64b199575799dc42effcf325f7042dd3bf17ebddc59f4aaa40282663fd96b3dddc21534eb92d  use-openssl.patch
"
